/**
 * 
 *  @project Air Traff Monitor
 * 
 *  @author M.Emre ATASEVER <m.emre.atas@gmail.com>
 *  @author M.Burak ALKAN <mburakalkan@gmail.com>
 *  @author H.Burak KARAMIK <bkaramik@gmail.com>
 *
 *	`Air Traffic Monitor' is distributed in the hope that it will be useful,
 *	but WITHOUT ANY WARRANTY; without even the implied warranty of
 *	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *	GNU General Public License for more details.
 *
 *	You should have received a copy of the GNU General Public License
 *	along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef  LINEEDIT_INC
#define  LINEEDIT_INC

#include <QLineEdit>
#include <QMenu>
#include <QToolButton>
#include <QStyle>

enum filterMode{Starts,Ends,Contains,Equals,RegExp};

class FilterEdit : public QLineEdit
{
	Q_OBJECT

public:
	FilterEdit(QWidget *parent = 0);
	QAction acon,astart,aend,aeq,areg,ainv,acase;
signals:
	void modeChanged(filterMode mode);
protected:
	void resizeEvent(QResizeEvent *);
private:
	int ops;
	QActionGroup ag;
	bool inv,cas;
	QToolButton clearButton;
	QMenu menu;
private slots:
	void opChanged();
};

#endif
